﻿#pragma once

#include <QWidget>

namespace TDesign
{
    class TBaseWindow : public QWidget
    {
        Q_OBJECT

    public:
        explicit TBaseWindow(QWidget *parent = nullptr);

        ~TBaseWindow() override;

    protected:
        void mousePressEvent(QMouseEvent *event) override;

        void mouseReleaseEvent(QMouseEvent *event) override;

        void mouseMoveEvent(QMouseEvent *event) override;

        void paintEvent(QPaintEvent *event) override;

    private:
        QPoint press_pos;
        bool flag_dragging = false;
    };
}
